/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.financial.entity.incomeexpenditure;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.base.entity.cars.Tcar;
import org.hibernate.validator.constraints.Length;

/**
 * 收支明细单Entity
 * @author LV
 * @version 2021-03-04
 */
@Table(name="t_income_expenditure_detail", alias="a", columns={
		@Column(name="income_expenditure_detail_id", attrName="incomeExpenditureDetailId", label="收支车辆明细ID", isPK=true),
		@Column(name="car_id", attrName="carId", label="车辆"),
		@Column(name="row_number", attrName="rowNumber", label="行号"),
		@Column(name="model", attrName="model", label="车型", queryType=QueryType.LIKE),
		@Column(name="frame_number", attrName="frameNumber", label="车架号"),
		@Column(name="foreign_currency_price", attrName="foreignCurrencyPrice", label="外币价格"),
		@Column(name="income_amount", attrName="incomeAmount", label="收入金额"),
		@Column(name="expenditure_amount", attrName="expenditureAmount", label="支出金额"),
		@Column(name="income_expenditure_id", attrName="incomeExpenditureId.incomeExpenditureId", label="收支明细单ID"),
	}, joinTable={
        @JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= Tcar.class, attrName="tcar", alias="b",
                on="b.car_id = a.car_id", columns={
                @Column(name="car_id", label="车辆编码", isPK=true),
                @Column(name="car_name", label="车辆名称", isQuery=false),
        }),
}, orderBy="a.income_expenditure_detail_id ASC"
)
public class IncomeExpenditureDetail extends DataEntity<IncomeExpenditureDetail> {
	
	private static final long serialVersionUID = 1L;
	private String incomeExpenditureDetailId;		// 收支车辆明细ID
	private String carId;		// 车辆
	private String carName;		// 车辆
	private String model;		// 车型
	private String frameNumber;		// 车架号
	private Double foreignCurrencyPrice;		// 外币价格
	private Double incomeAmount;		// 收入金额
	private Double expenditureAmount;		// 支出金额
	private IncomeExpenditure incomeExpenditureId;		// 收支明细单ID 父类
    private Tcar tcar;
    private Long rowNumber;
	
	public IncomeExpenditureDetail() {
		this(null);
	}


	public IncomeExpenditureDetail(IncomeExpenditure incomeExpenditureId){
		this.incomeExpenditureId = incomeExpenditureId;
	}
	
	public String getIncomeExpenditureDetailId() {
		return incomeExpenditureDetailId;
	}

	public void setIncomeExpenditureDetailId(String incomeExpenditureDetailId) {
		this.incomeExpenditureDetailId = incomeExpenditureDetailId;
	}
	
	@Length(min=0, max=64, message="车辆长度不能超过 64 个字符")
	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}
	
	@Length(min=0, max=100, message="车型长度不能超过 100 个字符")
	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
	
	@Length(min=0, max=100, message="车架号长度不能超过 100 个字符")
	public String getFrameNumber() {
		return frameNumber;
	}

	public void setFrameNumber(String frameNumber) {
		this.frameNumber = frameNumber;
	}
	
	public Double getForeignCurrencyPrice() {
		return foreignCurrencyPrice;
	}

	public void setForeignCurrencyPrice(Double foreignCurrencyPrice) {
		this.foreignCurrencyPrice = foreignCurrencyPrice;
	}
	
	public Double getIncomeAmount() {
		return incomeAmount;
	}

	public void setIncomeAmount(Double incomeAmount) {
		this.incomeAmount = incomeAmount;
	}
	
	public Double getExpenditureAmount() {
		return expenditureAmount;
	}

	public void setExpenditureAmount(Double expenditureAmount) {
		this.expenditureAmount = expenditureAmount;
	}
	
	public IncomeExpenditure getIncomeExpenditureId() {
		return incomeExpenditureId;
	}

	public void setIncomeExpenditureId(IncomeExpenditure incomeExpenditureId) {
		this.incomeExpenditureId = incomeExpenditureId;
	}

    public Tcar getTcar() {
        return tcar;
    }

    public void setTcar(Tcar tcar) {
        this.tcar = tcar;
    }

    public String getCarName() {
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }

    public Long getRowNumber() {
        return rowNumber;
    }

    public void setRowNumber(Long rowNumber) {
        this.rowNumber = rowNumber;
    }
}